﻿@model ARchGL.Declaration.Platform.Service.Dtos.ProjectDto
<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <span id="module">系统管理员</span>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <span id="action"></span>
        </li>
    </ul>
</div>
<!-- END PAGE BAR -->
<div class="mt-bootstrap-tables" style="margin-top:20px">
    <div class="row">
        <div class="col-md-12">
            <div class="portlet light bordered">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="icon-social-dribbble font-green hide"></i>
                    </div>
                    <div class="actions">
                        <a class="btn btn-default" href="@Url.Action("Edit")">
                            <i class="fa fa-plus"></i> 添加
                        </a>
                        <a class="btn btn-default" href="@Url.Action("Index")">
                            <i class="fa fa-list-ul"></i> 列表
                        </a>
                    </div>
                </div>
                <div class="portlet-body form">
                    <!-- BEGIN FORM-->
                    <form id="defaultForm" class="form-horizontal" method="post" novalidate="novalidate">
                        <div class="form-body">
                            <div class="row">
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <label class="control-label col-md-3">
                                            帐号：
                                        </label>
                                        <div class="col-md-9">
                                            <div class="input-icon right">
                                                <i class="fa"></i>
                                                @*@Html.HiddenFor(x => x.Id)*@
                                                <p class="form-control-static"> @Html.Raw(Model.Name)   </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label col-md-3">
                                            金额：
                                            <span class="required" aria-required="true">*</span>
                                        </label>
                                        <div class="col-md-9">
                                            <div class="input-icon right">
                                                <i class="fa"></i>
                                                <p class="form-control-static">     </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label col-md-3">
                                            个数：
                                        </label>
                                        <div class="col-md-9" id="lecturerDiv">
                                            <div class="input-icon right">
                                                <i class="fa"></i>
                                                <p class="form-control-static">     </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <!-- END FORM-->
                </div>
            </div>
        </div>
    </div>
</div>
@section scripts{
    <script type="text/javascript">
        var opIndexColumns = function (value, row, index) {
            return index + 1;
        },
            opColumns = function (value, row, index) {
                if (row.IsSuperAdmin) {
                    return "-";
                }
                else if (row.EnabledMark == null || row.EnabledMark) {
                    return ("<a href=\"@Url.Action("Edit")?memberid=_id_\">编辑</a> | <a href=\"@Url.Action("Assignment")?memberid=_id_\">角色</a> | <a href=\"javascript:_updateState('_id_'," + false + ");\">" + "禁用" + "</a>").replace(/_id_/ig, row.Id).replace(/_name_/ig, encodeURI(row.Account));

                } else if (!row.EnabledMark) {
                    return ("<a href=\"@Url.Action("Edit")?memberid=_id_\">编辑</a> | <a href=\"@Url.Action("Assignment")?memberid=_id_\">角色</a> | <a href=\"javascript:_updateState('_id_'," + true + ");\">" + "启用" + "</a> | <a href=\"javascript:_delte('_id_');\">删除</a>").replace(/_id_/ig, row.Id).replace(/_name_/ig, encodeURI(row.Account));

                }

            },

            _delte = function (id) {
                bootbox.confirm("是否确认删除？", function (result) {
                    if (!result) {
                        return;
                    }
                    $.ajax({
                        type: "POST",
                        url: "@Url.Action("DeleteMember")",
                        data: { memberId: id },
                        async: false,
                        success: function (result) {
                            if (result.Success) {
                                $("#table-pagination").bootstrapTable('refresh');
                            } else {
                                showToast(3, '系统消息', result.Message);
                            }
                        }
                    });
                });

            };
    </script>
}